#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int removeElement(int* nums, int numsSize, int val)
{

    int i = 0;
    int count = 0;
    int level = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (nums[i] != val)
        {
            count++;
            nums[level] = nums[i];
            level++;
        }
    }
    return count;

}

int main()
{
    int arr[] = { 3, 2, 2, 3 };
    int len = removeElement(arr, sizeof(arr) / sizeof(int), 2);
    printf("%d", len);
}